/**
 * 活动管理
 */
import request from '/@/utils/request';

export function readAllWeappUser(params?: any) {
  return request({
    url: 'weapp-users',
    method: 'get',
    params,
  });
}

export function readOneWeappUser(id: string) {
  return request({
    url: `weapp-users/${id}`,
    method: 'get',
  });
}

export function getQrcode(id: string) {
  return request({
    url: `weapp-users/${id}/qrcode`,
    method: 'get',
    responseType: 'blob'
  });
}

export function updateWeappUser(id: string, data: any) {
  return request({
    url: `weapp-users/${id}`,
    method: 'patch',
    data,
  });
}

export function deleteWeappUser(id: string) {
  return request({
    url: `weapp-users/${id}`,
    method: 'delete',
  });
}
